package com.itheima.a04mygeneiccs;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

public class GenericsDemo1 {
    public static void main(String[] args) {
        //1.创建集合的对象
        ArrayList list=new ArrayList();

        //2.添加数据
        list.add(123);
        list.add("aaa");

        Iterator it=list.iterator();
        while(it.hasNext()){
            Object obj=it.next();
            //obj.length();
            System.out.println(obj);
        }
    }
}
